<template>
  <div class="chart11">
    <div id="chart11">

    </div>
  </div>
</template>

<script>
import echarts from 'echarts'


var option = {
  color: ['#3398DB'],
  tooltip: {
    trigger: 'axis',
    axisPointer: {            // 坐标轴指示器，坐标轴触发有效
      type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
    }
  },
  grid: {
    top: '3%',
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: [
    {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
      axisTick: {
        alignWithLabel: true
      },
      axisLine: { lineStyle: { color: '#ffffff' } }

    }
  ],
  yAxis: [
    {
      type: 'value',
      axisLine: { lineStyle: { color: '#ffffff' } }
    }
  ],
  series: [
    {
      name: '直接访问',
      type: 'bar',
      barWidth: '60%',
      data: [10, 52, 200, 334, 390, 330, 220]
    }
  ]
};
export default {

  data() {
    return {
      box: null
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      this.box = echarts.init(document.getElementById('chart11'));
      this.box.setOption(option);
    },
    resize() {
      this.box.resize()
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.chart11 {
  width: 100%;
  height: 100%;
}
#chart11 {
  width: 100%;
  height: 100%;
}
</style>
